package com.cxz.study.application.order.web.useCase;

import com.cxz.study.application.order.web.mapper.OrderWebMapperStruct;
import com.cxz.study.domain.order.command.CancelOrderCommand;
import com.cxz.study.domain.order.Order;
import com.cxz.study.domain.order.OrderDomainService;
import org.springframework.stereotype.Service;

/**
 * @className: CancelOrderUseCase
 * @author: ocxz1
 * @date: 2025/6/15 下午12:58
 * @Version: 1.0
 * @description: ddd-struct3
 */
@Service
public class CancelOrderUseCase extends AbstractOrderUseCase<CancelOrderCommand>{
    public CancelOrderUseCase(OrderWebMapperStruct orderWebMapperStruct, OrderDomainService orderDomainService) {
        super(orderWebMapperStruct, orderDomainService);
    }

    @Override
    public Order doExecute(CancelOrderCommand command) {
        return getOrderDomainService().cancelOrder(command);
    }
}
